package com.sale.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import com.sale.system.api.domain.dto.SysCustomDto;
import com.sale.system.domain.PullDown;
import com.sale.system.domain.SysColumn;
import com.sale.system.domain.SysCustom;
import com.sale.system.domain.SysFields;
import com.sale.system.domain.dto.SysFieldsDto;
import com.sale.system.domain.vo.WatchHeadVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description 自定义表头
 * @Date 23-11-06
 * @Author hl
 **/
public interface SysFieldsMapper extends BaseMapperPlus<SysFieldsMapper, SysFields, SysFields> {
    List<PullDown> selectSysFields(String fieldsTable);

    int insertFields(WatchHeadVo watchHead);

    List<PullDown> selectPullDown(String model);

    List<SysColumn> selectSysColumn(String path);

    //菜单id
    String selectTableName(long menuId);

    //地址查询表名
    String selectTableMenu(String path);

    /**
     * 查询自定义表头
     *
     * @param page,buildQueryWrapper
     * @return Page<SysFields>
     */
    Page<SysFields> selectPageFieldsList(@Param("page") Page<SysFields> page,@Param(Constants.WRAPPER) Wrapper<SysFields> buildQueryWrapper);

    /**
     * 通过id自定义表头
     *
     * @param fieldsId
     * @return SysFields
     */
    SysFields selectFieldsById(long fieldsId);

    /**
     * 通过id自定义表头
     *
     * @param table
     * @return SysFields
     */
    List<PullDown> selectSysFieldsPull(String table);


    /**
     * 默认查询该住户下所有自定义表头
     *
     * @param
     * @return List<SysCustom>
     */
    List<SysCustomDto> selectCustom();

    /**
     * 获取动态表头
     * @param path
     * @return
     */
    List<SysFields> selectCaseList(String path);
}
